<!DOCTYPE html>
<html lang="zh">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Template 制作模版</title>
  <script src="../assets/js/vue.js"></script>
</head>

<body>
  <h1>Template三种写法</h1>
  <hr>
  <div id="app">
    {{message}}
  </div>
  <template id="dd2">
    <h2 style="color:red;">我是Template标签模板</h2>
  </template>
  <script type="x-template" id="dd3">
    <h2 style="color:red;">我是script标签模板</h2>
  </script>
  <script type="text/javascript">
    var app = new Vue({
      el: '#app',
      data: {
        message: 'hello world'
      },
      template: "#dd3"
      // template:`
      //   <h2 style="color:red;">我是选项模板</h2>
      // `
    })
  </script>
</body>

</html>